﻿using AzureDiagMon.Common.Dtos;
using AzureDiagMon.Common.Mvvm;
using AzureDiagMon.ViewModels.Base;
using AzureDiagMon.ViewModels.Entities;

namespace AzureDiagMon.ViewModels.EntityEditors
{
    [DialogSize(400, 200)]
    [ViewModel("StorageAccountEditor")]
    public class StorageAccountEditorViewModel : EntityEditorViewModel<StorageAccountDto>
    {
        public StorageAccountEditorViewModel() { }
        public StorageAccountEditorViewModel(StorageAccountDto entity) : base(entity) { }

        #region Overrides of EntityEditorViewModel<StorageAccountEditor,StorageAccount>

        public override EntityViewModel<StorageAccountDto> CreateEntityViewModel(StorageAccountDto entity)
        {
            return new StorageAccountViewModel(entity);
        }

        #endregion

        public override bool HandleOkCommand()
        {
            return Validate();
        }
    }
}
